﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ColumnManage.aspx.cs" Inherits="ColumnManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>模块</title>
</head>
<body>
    <form id="frmColumn" runat="server">
        <div style="width:960px;margin:0 auto;">
            <asp:ObjectDataSource ID="odsColumn" runat="server" SelectMethod="GetModelList" 
                TypeName="Chain.BLL.SysModule" DataObjectTypeName="Chain.Model.SysModule" 
                onupdated="odsColumn_Updated" UpdateMethod="Update" 
                onupdating="odsColumn_Updating">
                <SelectParameters>
                    <asp:Parameter DefaultValue="0" Name="moduleParentID" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:GridView ID="gvwColumn" runat="server" BackColor="White" 
                BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                DataSourceID="odsColumn" EnableModelValidation="True" 
                AutoGenerateColumns="False" Width="960px" 
                onrowdatabound="gvwColumn_RowDataBound">
                <Columns>
                    <asp:CommandField ShowEditButton="True" CausesValidation="False" />
                    <asp:BoundField DataField="ModuleID" HeaderText="ModuleID" ReadOnly="True" >
                    <ItemStyle Width="30px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ModuleCaption" HeaderText="ModuleCaption">
                    <ControlStyle Width="200px" />
                    <ItemStyle Width="200px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ModuleOrder" HeaderText="ModuleOrder" />
                    <asp:CheckBoxField DataField="ModuleVisible" HeaderText="ModuleVisible">
                    </asp:CheckBoxField>
                    <asp:BoundField DataField="ModuleIcoPath" HeaderText="ModuleIcoPath">
                    <ControlStyle Width="200px" />
                    <ItemStyle Width="200px" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="是否加载" ShowHeader="False">
                        <ItemTemplate>
                            <asp:CheckBox ID="ckbIsPowerReg" runat="server" AutoPostBack="True" 
                                oncheckedchanged="ckbIsPowerReg_CheckedChanged" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:HyperLinkField DataNavigateUrlFields="ModuleID" 
                        DataNavigateUrlFormatString="ModuleManage.aspx?ModuleParentID={0}" 
                        Text="编辑模块" />
                </Columns>
                <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                <RowStyle BackColor="White" ForeColor="#330099" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
            </asp:GridView>
            <br />
            <div style="border:1px solid #ccc; padding:8px 15px;">
                <asp:Label ID="Label1" runat="server" Text="模块标题："></asp:Label>
                <asp:TextBox ID="txtModuleCaption" runat="server" Width="304px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtModuleCaption" Display="Dynamic">模块标题不能为空</asp:RequiredFieldValidator>
                <div style="height:5px;"></div>
                <asp:Label ID="Label2" runat="server" Text="排列序号："></asp:Label>
                <asp:TextBox ID="txtModuleOrder" runat="server" Width="304px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtModuleOrder" Display="Dynamic">排列序号不能为空</asp:RequiredFieldValidator>
                <asp:RangeValidator ID="RangeValidator1" runat="server" 
                    ControlToValidate="txtModuleOrder" Display="Dynamic" MaximumValue="65535" 
                    MinimumValue="1" Type="Integer">排列序号必须是1-65535之间的正整数</asp:RangeValidator>
                <div style="height:5px;"></div>
                <asp:Label ID="Label3" runat="server" Text="是否显示："></asp:Label>
                <asp:CheckBox ID="ckbModuleVisible" runat="server" />
                <div style="height:5px;"></div>
                <asp:Label ID="Label4" runat="server" Text="图标路径："></asp:Label>
                <asp:TextBox ID="txtModuleIcoPath" runat="server" Width="304px">images/ico/</asp:TextBox>
                <div style="height:5px;"></div>
                <span><asp:Button ID="Button1" runat="server" Text="确定新增模块" 
                    onclick="Button1_Click" /></span>
            </div>
        </div>
    </form>
</body>
</html>
